package java_thinking.unit_14._14_3;

import java_thinking.unit_14.pets.*;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @Description :
 * @author: cww
 * @DateTime: 2019-03-28 23:42
 */

public class LiteralPetCreator extends PetCreator{
    @SuppressWarnings("unchecked")
    public static final List<Class<? extends Pet>> allTypes = Collections.unmodifiableList(Arrays.asList(Pet.class, Dog.class, Cat.class,Mutt.class,Pug.class));
    private static final List<Class<? extends Pet>> types = allTypes.subList(allTypes.indexOf(Mutt.class),allTypes.size());
    @Override
    public List<Class<? extends Pet>> types() {
        return types;
    }

    public static void main(String[] args) {
        System.out.println(types);
    }
}
